package cn.agiledata.bank.common.exception;

import cn.agiledata.bank.common.exception.BusinessException;

public class BussinessException extends RuntimeException {
	
	public static BusinessException CHANGEOUT_NOT_PREMISSION = 
		new BusinessException ("操作失败，请选择待确认交易") ;

	public static BusinessException CHANGEIN_NOT_PREMISSION = 
		new BusinessException ("转入操作不允许，请选择已转出交易") ;
	
	public static BusinessException NOT_EXIST = 
		new BusinessException ("您所要获取的交易信息不存在") ;
	
	public static BusinessException ACTIONTYPE_NOT_EXIST = 
		new BusinessException ("您所要获取的交易信息不存在") ;	
	//exception by innerAccount
	public static BusinessException INNER_ACCOUNT_SAVEFAULT = 
		new BusinessException ("内部账户保存操作失败") ;
	
	public static BusinessException INNER_ACCOUNT_LISTFAULT =
		new BusinessException("列表查询失败！");
	
	public static BusinessException SELECT_SINGLE=
		new BusinessException("请选择一个");
	
	public static BusinessException STATUS_NOT_PREMISSION=
		new BusinessException("您的操作不允许，请另外选择");

	public static BusinessException NOT_ENOUGHMONEY=
		new BusinessException("该账户没有足够资金！");
	
	private String returnCode ;
	
	public BussinessException (String rtnCode, Throwable reason) {
		super (rtnCode, reason) ;
		this.returnCode = rtnCode ;
	}
	
	public BussinessException (String rtnCode) {
		this (rtnCode, null) ;
	}

	/**
	 * @return Returns the returnMsg.
	 */
	public String getReturnCode() {
		return returnCode;
	}
}
